package com.lx.websockt.bean;


import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;

import javax.annotation.PostConstruct;

@Data
// ConfigurationProperties 一次性加载配置文件
@ConfigurationProperties(prefix = "websockt")
public class WebsocktPropertise {

    private boolean enable;
    private String userTable;
    private String keyColumn = "id";
    private String danMuClass;

    Class danMuClassObject;

    // IOC bean 装载之后
    @PostConstruct
    void myInit() throws ClassNotFoundException {
        danMuClassObject = Class.forName(getDanMuClass());
    }
}
